import { request } from '@ruifox-cms/utils'
// 根据类型和id查询资源列表
export function pagingRefer(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/resource/refer/paging',
    method: 'post',
    data
  })
}
//保存资源
export function createRefer(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/resource/refer/create',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', 
    },
    data
  })
}
//创建资源关联
export function createReferenceResource(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/resource/createReference',
    method: 'post',
    data
  })
}
///获取资源引用列表
export function getReferencedTypeResourcesRefer(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/resource/refer/getReferencedTypeResources',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', 
    },
    data
  })
}
// 根据文件id查详情
export function getResourceDataRefer(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/resource/refer/getResourceData',
    method: 'get',
    params
  })
}